﻿/**
 * EmitterConfigMask
 *
 * @author		Allen Chou
 * @version 	1.1.1 (last update: Aug 26 2008)
 * @link        http://cjcat.blogspot.com
 * @link		http://cjcat2266.deviantart.com
 */

/*
 * Copyright 2008 (C) Allen Chou (cjcat2266@gmail.com)
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */

package idv.cjcat.display.particles {
	
	public class EmitterConfigMask {
		
		public var x:Boolean = true;
		public var y:Boolean = true;
		public var rotation:Boolean = true;
		public var scaleX:Boolean = true;
		public var scaleY:Boolean = true;
		
		public var displayClass:Boolean = true;
		public var container:Boolean = true;
		public var addChildMode:Boolean = true;
		public var centerX:Boolean = true;
		public var centerY:Boolean = true;
		public var oriented:Boolean = true;
		public var orientationOffset:Boolean = true;
		public var direction:Boolean = true;
		public var directionVar:Boolean = true;
		public var bubbleMotion:Boolean = true;
		public var bubbleAmplitude:Boolean = true;
		public var bubbleamplitudeVar:Boolean = true;
		public var bubbleFrequency:Boolean = true;
		public var bubbleFrequencyVar:Boolean = true;
		public var normal:Boolean = true;
		public var showAuxShape:Boolean = true;
		public var auxShapeLineStyle:Boolean = true;
		public var rate:Boolean = true;
		public var rateVar:Boolean = true;
		public var life:Boolean = true;
		public var lifeVar:Boolean = true;
		
		internal var _gravaties:Boolean = true;
		internal var _deflectors:Boolean = true;
		public   var velocityField:Boolean = true;
		public   var velocityFieldOverride:Boolean = true;
		
		public var scale:Boolean = true;
		public var scaleVar:Boolean = true;
		public var speed:Boolean = true;
		public var speedVar:Boolean = true;
		public var bidirectional:Boolean = true;
		public var initAngle:Boolean = true;
		public var initAngleVar:Boolean = true;
		public var initAlpha:Boolean = true;
		public var initAlphaVar:Boolean = true;
		public var spin:Boolean = true;
		public var spinVar:Boolean = true;
		public var finalAlpha:Boolean = true;
		public var finalAlphaVar:Boolean = true;
		public var finalScale:Boolean = true;
		public var finalScaleVar:Boolean = true;
		public var alphaDecayAt:Boolean = true;
		public var alphaDecayAtVar:Boolean = true;
		public var scaleDecayAt:Boolean = true;
		public var scaleDecayAtVar:Boolean = true;
		
		//LineEmitter specifics
		public var length:Boolean = true;
		
		public function EmitterConfigMask(initBool:Boolean = true) {
			if (initBool) {
				selectAll();
			} else {
				deselectAll();
			}
		}
		
		public function selectAll():void {
			x = true;
			y = true;
			rotation = true;
			scaleX = true;
			scaleY = true;
			
			displayClass = true;
			container = true;
			addChildMode = true;
			centerX = true;
			centerY = true;
			oriented = true;
			orientationOffset = true;
			direction = true;
			directionVar = true;
			bubbleMotion = true;
			bubbleAmplitude = true;
			bubbleamplitudeVar = true;
			bubbleFrequency = true;
			bubbleFrequencyVar = true;
			normal = true;
			showAuxShape = true;
			auxShapeLineStyle = true;
			rate = true;
			rateVar = true;
			life = true;
			lifeVar = true;
			
			gravaties = true;
			deflectors = true;
			velocityField = true;
			velocityFieldOverride = true;
			
			scale = true;
			scaleVar = true;
			speed = true;
			speedVar = true;
			bidirectional = true;
			initAngle = true;
			initAngleVar = true;
			initAlpha = true;
			initAlphaVar = true;
			spin = true;
			spinVar = true;
			finalAlpha = true;
			finalAlphaVar = true;
			finalScale = true;
			finalScaleVar = true;
			alphaDecayAt = true;
			alphaDecayAtVar = true;
			scaleDecayAt = true;
			scaleDecayAtVar = true;
			
			//LineEmitter specifics
			length = true;
		}
		
		public function deselectAll():void {
			x = false;
			y = false;
			rotation = false;
			scaleX = false;
			scaleY = false;
			
			displayClass = false;
			container = false;
			addChildMode = false;
			centerX = false;
			centerY = false;
			oriented = false;
			orientationOffset = false;
			direction = false;
			directionVar = false;
			bubbleMotion = false;
			bubbleAmplitude = false;
			bubbleamplitudeVar = false;
			bubbleFrequency = false;
			bubbleFrequencyVar = false;
			normal = false;
			showAuxShape = false;
			auxShapeLineStyle = false;
			rate = false;
			rateVar = false;
			life = false;
			lifeVar = false;
			
			gravaties = false;
			deflectors = false;
			velocityField = false;
			velocityFieldOverride = false;
			
			scale = false;
			scaleVar = false;
			speed = false;
			speedVar = false;
			bidirectional = false;
			initAngle = false;
			initAngleVar = false;
			initAlpha = false;
			initAlphaVar = false;
			spin = false;
			spinVar = false;
			finalAlpha = false;
			finalAlphaVar = false;
			finalScale = false;
			finalScaleVar = false;
			alphaDecayAt = false;
			alphaDecayAtVar = false;
			scaleDecayAt = false;
			scaleDecayAtVar = false;
			
			//LineEmitter specifics
			length = true;
		}
		
		public function get gravaties():Boolean { return _gravaties; }
		public function set gravaties(value:Boolean):void {
			_gravaties = value;
		}
		public function get deflectors():Boolean { return _deflectors; }
		public function set deflectors(value:Boolean):void {
			_deflectors = value;
		}		
		
	}
}